home *** CD-ROM | disk | FTP | other *** search
Wrap
EEEELLLLFFFF____UUUUPPPPDDDDAAAATTTTEEEE((((3333EEEE)))) EEEELLLLFFFF____UUUUPPPPDDDDAAAATTTTEEEE((((3333EEEE)))) NNNNAAAAMMMMEEEE _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee - update an ELF descriptor SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _cccc_cccc [_f_l_a_g ...] _f_i_l_e ... _----_llll_eeee_llll_ffff [_l_i_b_r_a_r_y ...] _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_eeee_llll_ffff_...._hhhh_>>>> _oooo_ffff_ffff______tttt _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _EEEE_llll_ffff______CCCC_mmmm_dddd _cccc_mmmm_dddd_))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee causes the library to examine the information associated with an ELF descriptor, _e_l_f, and to recalculate the structural data needed to generate the file's image. _c_m_d may have the following values. _EEEE_LLLL_FFFF______CCCC______NNNN_UUUU_LLLL_LLLL This value tells _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee to recalculate various values, updating only the ELF descriptor's memory structures. Any modified structures are flagged with the _EEEE_LLLL_FFFF______FFFF______DDDD_IIII_RRRR_TTTT_YYYY bit. A program thus can update the structural information and then reexamine them without changing the file associated with the ELF descriptor. Because this does not change the file, the ELF descriptor may allow reading, writing, or both reading and writing [see _eeee_llll_ffff______bbbb_eeee_gggg_iiii_nnnn(3E)]. _EEEE_LLLL_FFFF______CCCC______WWWW_RRRR_IIII_TTTT_EEEE If _c_m_d has this value, _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee duplicates its _EEEE_LLLL_FFFF______CCCC______NNNN_UUUU_LLLL_LLLL actions and also writes any ``dirty'' information associated with the ELF descriptor to the file. That is, when a program has used _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa or the _eeee_llll_ffff______ffff_llll_aaaa_gggg facilities to supply new (or update existing) information for an ELF descriptor, those data will be examined, coordinated, translated if necessary [see _eeee_llll_ffff______xxxx_llll_aaaa_tttt_eeee(3E)], and written to the file. When portions of the file are written, any _EEEE_LLLL_FFFF______FFFF______DDDD_IIII_RRRR_TTTT_YYYY bits are reset, indicating those items no longer need to be written to the file [see _eeee_llll_ffff______ffff_llll_aaaa_gggg(3E)]. The sections' data are written in the order of their section header entries, and the section header table is written to the end of the file. When the ELF descriptor was created with _eeee_llll_ffff______bbbb_eeee_gggg_iiii_nnnn, it must have allowed writing the file. That is, the _eeee_llll_ffff______bbbb_eeee_gggg_iiii_nnnn command must have been either _EEEE_LLLL_FFFF______CCCC______RRRR_DDDD_WWWW_RRRR or _EEEE_LLLL_FFFF______CCCC______WWWW_RRRR_IIII_TTTT_EEEE. If _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee succeeds, it returns the total size of the file image (not the memory image), in bytes. Otherwise an error occurred, and the function returns -1. PPPPaaaaggggeeee 1111 EEEELLLLFFFF____UUUUPPPPDDDDAAAATTTTEEEE((((3333EEEE)))) EEEELLLLFFFF____UUUUPPPPDDDDAAAATTTTEEEE((((3333EEEE)))) When updating the internal structures, _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee sets some members itself. Members listed below are the application's responsibility and retain the values given by the program. Member Notes _________________________________________________________ _eeee______iiii_dddd_eeee_nnnn_tttt_[[[[_EEEE_IIII______DDDD_AAAA_TTTT_AAAA_]]]] Library controls other _eeee______iiii_dddd_eeee_nnnn_tttt values _eeee______tttt_yyyy_pppp_eeee _eeee______mmmm_aaaa_cccc_hhhh_iiii_nnnn_eeee _eeee______vvvv_eeee_rrrr_ssss_iiii_oooo_nnnn _eeee______eeee_nnnn_tttt_rrrr_yyyy _eeee______pppp_hhhh_oooo_ffff_ffff Only when _EEEE_LLLL_FFFF______FFFF______LLLL_AAAA_YYYY_OOOO_UUUU_TTTT asserted _eeee______ssss_hhhh_oooo_ffff_ffff Only when _EEEE_LLLL_FFFF______FFFF______LLLL_AAAA_YYYY_OOOO_UUUU_TTTT asserted _eeee______ffff_llll_aaaa_gggg_ssss ELF Header _eeee______ssss_hhhh_ssss_tttt_rrrr_nnnn_dddd_xxxx _________________________________________________________ ||||||||||| Member Notes ________________________________________ _pppp______tttt_yyyy_pppp_eeee The application controls all _pppp______oooo_ffff_ffff_ssss_eeee_tttt program header entries _pppp______vvvv_aaaa_dddd_dddd_rrrr _pppp______pppp_aaaa_dddd_dddd_rrrr _pppp______ffff_iiii_llll_eeee_ssss_zzzz _pppp______mmmm_eeee_mmmm_ssss_zzzz _pppp______ffff_llll_aaaa_gggg_ssss Program Header _pppp______aaaa_llll_iiii_gggg_nnnn ________________________________________ |||||||||| Member Notes _______________________________________________ _ssss_hhhh______nnnn_aaaa_mmmm_eeee _ssss_hhhh______tttt_yyyy_pppp_eeee _ssss_hhhh______ffff_llll_aaaa_gggg_ssss _ssss_hhhh______aaaa_dddd_dddd_rrrr _ssss_hhhh______oooo_ffff_ffff_ssss_eeee_tttt Only when _EEEE_LLLL_FFFF______FFFF______LLLL_AAAA_YYYY_OOOO_UUUU_TTTT asserted _ssss_hhhh______ssss_iiii_zzzz_eeee Only when _EEEE_LLLL_FFFF______FFFF______LLLL_AAAA_YYYY_OOOO_UUUU_TTTT asserted _ssss_hhhh______llll_iiii_nnnn_kkkk _ssss_hhhh______iiii_nnnn_ffff_oooo _ssss_hhhh______aaaa_dddd_dddd_rrrr_aaaa_llll_iiii_gggg_nnnn Only when _EEEE_LLLL_FFFF______FFFF______LLLL_AAAA_YYYY_OOOO_UUUU_TTTT asserted Section Header _ssss_hhhh______eeee_nnnn_tttt_ssss_iiii_zzzz_eeee _______________________________________________ |||||||||||| PPPPaaaaggggeeee 2222 EEEELLLLFFFF____UUUUPPPPDDDDAAAATTTTEEEE((((3333EEEE)))) EEEELLLLFFFF____UUUUPPPPDDDDAAAATTTTEEEE((((3333EEEE)))) Member Notes ____________________________________________ _dddd______bbbb_uuuu_ffff _dddd______tttt_yyyy_pppp_eeee _dddd______ssss_iiii_zzzz_eeee _dddd______oooo_ffff_ffff Only when _EEEE_LLLL_FFFF______FFFF______LLLL_AAAA_YYYY_OOOO_UUUU_TTTT asserted _dddd______aaaa_llll_iiii_gggg_nnnn Data Descriptor _dddd______vvvv_eeee_rrrr_ssss_iiii_oooo_nnnn ____________________________________________ |||||||| Note the program is responsible for two particularly important members (among others) in the ELF header. The _eeee______vvvv_eeee_rrrr_ssss_iiii_oooo_nnnn member controls the version of data structures written to the file. If the version is _EEEE_VVVV______NNNN_OOOO_NNNN_EEEE, the library uses its own internal version. The _eeee______iiii_dddd_eeee_nnnn_tttt_[[[[_EEEE_IIII______DDDD_AAAA_TTTT_AAAA_]]]] entry controls the data encoding used in the file. As a special case, the value may be _EEEE_LLLL_FFFF_DDDD_AAAA_TTTT_AAAA_NNNN_OOOO_NNNN_EEEE to request the native data encoding for the host machine. An error occurs in this case if the native encoding doesn't match a file encoding known by the library. Further note that the program is responsible for the _ssss_hhhh______eeee_nnnn_tttt_ssss_iiii_zzzz_eeee section header member. Although the library sets it for sections with known types, it cannot reliably know the correct value for all sections. Consequently, the library relies on the program to provide the values for unknown section type. If the entry size is unknown or not applicable, the value should be set to zero. When deciding how to build the output file, _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee obeys the alignments of individual data buffers to create output sections. A section's most strictly aligned data buffer controls the section's alignment. The library also inserts padding between buffers, as necessary, to ensure the proper alignment of each buffer. SSSSEEEEEEEE AAAALLLLSSSSOOOO _eeee_llll_ffff(3E), _eeee_llll_ffff______bbbb_eeee_gggg_iiii_nnnn(3E), _eeee_llll_ffff______ffff_llll_aaaa_gggg(3E), _eeee_llll_ffff______ffff_ssss_iiii_zzzz_eeee(3E), _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E), _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E), _eeee_llll_ffff______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr(3E), _eeee_llll_ffff______xxxx_llll_aaaa_tttt_eeee(3E). NNNNOOOOTTTTEEEE As mentioned above, the _EEEE_LLLL_FFFF______CCCC______WWWW_RRRR_IIII_TTTT_EEEE command translates data as necessary, before writing them to the file. This translation is _n_o_t always transparent to the application program. If a program has obtained pointers to data associated with a file [for example, see _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E) and _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E)], the program should reestablish the pointers after calling _eeee_llll_ffff______uuuu_pppp_dddd_aaaa_tttt_eeee. PPPPaaaaggggeeee 3333